<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/commons/global.jsp" %>
<style>

</style>
<script type="text/javascript">
    $(function () {
        $('#formDesignEditForm').form({
            url: '${path}/formDesign/edit',
            onSubmit: function () {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success: function (result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    showMsg(result.msg);
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                    parent.$.modalDialog.openner_treeGrid.treegrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    var form = $('#formDesignEditForm');
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
        $("#valid").val('${formDesign.valid}');
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow-x:hidden;overflow-y: auto;padding: 3px;">
        <form id="formDesignEditForm" method="post">
            <table class="grid">
                <input type="hidden" name="id" value="${formDesign.id}">
                <tr>
                    <td>状态</td>
                    <td>
                        <select name='valid' class='easyui-combobox'
                                data-options="width:140,height:29,editable:false,panelHeight:'auto'">
                            <option value='1'>有效</option>
                            <option value='0'>无效</option>
                        </select>
                    </td>
                    <td>类型</td>
                    <td>
                        <input name='type' id='type' type='text' placeholder='请输入类型' class='easyui-text-2  span2'
                               value='${formDesign.type}'>
                    </td>
                </tr>
                <tr>
                    <td>标题</td>
                    <td>
                        <input name='title' id='title' type='text' placeholder='请输入标题' class='easyui-text-2  span2'
                               value='${formDesign.title}'>
                    </td>
                    <td>版本号</td>
                    <td>
                        <input name='version' id='version' type='text' placeholder='请输入版本号' class='easyui-text-2  span2'
                               value='${formDesign.version}'>
                    </td>
                </tr>
                <tr>
                    <td>表名</td>
                    <td colspan="3">
                        <input name='tableName' id='tableName' type='text' placeholder='请输入表名'
                               class='easyui-text-2  span2' value='${formDesign.tableName}'>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>